﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GcmpModelInterface.h"
#include "IElement.h"

namespace gcmp
{
    class IGisLayer;
    class IModelView;
    class GCMP_MODEL_INTERFACE_EXPORT IGisLayerElement : public IElement
    {
        DEFINE_CAST_DERIVED(gcmp::IGisLayerElement, gcmp::IElement);
    public:
        virtual ~IGisLayerElement();

        /// \brief 获取Implementation Uid
        /// \return 返回ImplementationUid
        static UniIdentity GetImplementationUid();

        /// \brief 创建工厂方法
        /// \param pDocument 文档
        /// \return 返回IGISTileElement
        static IGisLayerElement* Create(IDocument* pDocument,const IGisLayer* pLayer);

        /// \brief 获取GisLayer对象
        /// \return       const IGisLayer*
        virtual const IGisLayer* GetLayer() const= 0;

        /// \brief 获取GisLayer的名称
        /// \return       std::wstring
        virtual std::wstring GetLayerName() const = 0;
        /// \brief 是否可见
        /// \return 是否可见
        virtual bool IsVisible() const = 0;

        /// \brief 设置可见性
        /// \param bVisible 是否可见
        virtual void SetVisible(bool bVisible)  = 0;

        /// \brief 获取构件节点是否可以被选择
        /// \return true-可以被选择；false-不可以被选择 默认可选
        virtual bool IsSelectable() const = 0;

        /// \brief 设置构件节点是否可以被选择
        /// \param selectable true-可以被选择；false-不可以被选择
        /// \return 无
        virtual void SetIsSelectable(bool selectable) = 0;

        /// \brief 获取gislayer的外接box：只所以从这里开接口，因为从grep中取不到
        /// \param const IModelView* pModelView  构件所在的modelview
        /// \return 外接Box
        virtual Box3d GetBox(const IModelView* pModelView) const = 0;

    };
}
